package com.aspose.cells;

public class DateTimeGroupItem {
   private int a;
   private int b;
   private byte c;
   private byte d;
   private byte e;
   private byte f;
   private byte g;

   void a(DateTimeGroupItem var1) {
      this.a = var1.a;
      this.b = var1.b;
      this.c = var1.c;
      this.d = var1.d;
      this.e = var1.e;
      this.f = var1.f;
      this.g = var1.g;
   }

   DateTimeGroupItem() {
   }

   boolean a(Cell var1) {
      switch(var1.getType()) {
      case 1:
      case 4:
         DateTime var2 = var1.getDateTimeValue();
         switch(this.a) {
         case 0:
            return var2.getYear() == (this.b & '\uffff') && var2.getMonth() == (this.c & 255) && var2.getDay() == (this.d & 255);
         case 1:
            return var2.getYear() == (this.b & '\uffff') && var2.getMonth() == (this.c & 255) && var2.getDay() == (this.d & 255) && var2.getHour() == (this.e & 255);
         case 2:
            return var2.getYear() == (this.b & '\uffff') && var2.getMonth() == (this.c & 255) && var2.getDay() == (this.d & 255) && var2.getHour() == (this.e & 255) && var2.getMinute() == (this.f & 255);
         case 3:
            return var2.getYear() == (this.b & '\uffff') && var2.getMonth() == (this.c & 255);
         case 4:
            return var2.getYear() == (this.b & '\uffff') && var2.getMonth() == (this.c & 255) && var2.getDay() == (this.d & 255) && var2.getHour() == (this.e & 255) && var2.getMinute() == (this.f & 255) && var2.getSecond() == (this.g & 255);
         case 5:
            return var2.getYear() == (this.b & '\uffff');
         }
      default:
         return false;
      }
   }

   boolean a(Object var1) {
      DateTime var2 = (DateTime)var1;
      switch(this.a) {
      case 0:
         return var2.getYear() == (this.b & '\uffff') && var2.getMonth() == (this.c & 255) && var2.getDay() == (this.d & 255);
      case 1:
         return var2.getYear() == (this.b & '\uffff') && var2.getMonth() == (this.c & 255) && var2.getDay() == (this.d & 255) && var2.getHour() == (this.e & 255);
      case 2:
         return var2.getYear() == (this.b & '\uffff') && var2.getMonth() == (this.c & 255) && var2.getDay() == (this.d & 255) && var2.getHour() == (this.e & 255) && var2.getMinute() == (this.f & 255);
      case 3:
         return var2.getYear() == (this.b & '\uffff') && var2.getMonth() == (this.c & 255);
      case 4:
         return var2.getYear() == (this.b & '\uffff') && var2.getMonth() == (this.c & 255) && var2.getDay() == (this.d & 255) && var2.getHour() == (this.e & 255) && var2.getMinute() == (this.f & 255) && var2.getSecond() == (this.g & 255);
      case 5:
         return var2.getYear() == (this.b & '\uffff');
      default:
         return false;
      }
   }

   public DateTime getMinValue() {
      switch(this.a) {
      case 0:
         return new DateTime(this.b & '\uffff', this.c & 255, this.d & 255);
      case 1:
         return new DateTime(this.b & '\uffff', this.c & 255, this.d & 255, this.e & 255, 0, 0);
      case 2:
         return new DateTime(this.b & '\uffff', this.c & 255, this.d & 255, this.e & 255, this.f & 255, 0);
      case 3:
         return new DateTime(this.b & '\uffff', this.c & 255, 1);
      case 4:
         return new DateTime(this.b & '\uffff', this.c & 255, this.d & 255, this.e & 255, this.f & 255, this.g & 255);
      case 5:
         return new DateTime(this.b & '\uffff', 1, 1);
      default:
         return DateTime.getNow();
      }
   }

   public DateTimeGroupItem(int type, int year, int month, int day, int hour, int minute, int second) {
      this.a = type;
      this.b = year;
      this.c = (byte)month;
      this.d = (byte)day;
      this.e = (byte)hour;
      this.f = (byte)minute;
      this.g = (byte)second;
   }

   public int getDateTimeGroupingType() {
      return this.a;
   }

   public void setDateTimeGroupingType(int value) {
      this.a = value;
   }

   public int getYear() {
      return this.b;
   }

   public void setYear(int value) {
      this.b = value;
   }

   public int getMonth() {
      return this.c;
   }

   public void setMonth(int value) {
      this.c = (byte)value;
   }

   public int getDay() {
      return this.d;
   }

   public void setDay(int value) {
      this.d = (byte)value;
   }

   public int getHour() {
      return this.e;
   }

   public void setHour(int value) {
      this.e = (byte)value;
   }

   public int getMinute() {
      return this.f;
   }

   public void setMinute(int value) {
      this.f = (byte)value;
   }

   public int getSecond() {
      return this.g;
   }

   public void setSecond(int value) {
      this.g = (byte)value;
   }
}
